home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr26 / icndos12.zip / RUN.DOC < prev    next >
Text File  |  1993-05-11  |  2KB  |  55 lines

  1.                                 RUN.DOC
  2.  
  3. IconDOS is basically a graphical front-end to a batch file, RUN.BAT.  The batch
  4. file does all of the real work of running each DOS command set and returning
  5. control back to the IconDOS menu front-end once it is finished.  RUN.BAT, has
  6. the following basic, generic structure:
  7.  
  8. @echo off <--- Turns echo off so commands don't display as they are executed.
  9. goto %1   <--- sends control to the label passed as the first parameter when
  10.                RUN.BAT was started.
  11. :label1
  12. (DOS commands) <--- User supplied DOS commands corresponding to the
  13. goto done           command string: RUN label1
  14.  
  15. :label2
  16. (DOS commands) <--- User supplied DOS commands for cmd string: RUN label2
  17. goto done      <--- Simply jumps over the remaining command sets and
  18.    .                goes straight to the cleanup area below
  19.    .
  20.    .           <--- (add more labels/command sets as needed here, one per
  21.    .                 icon)
  22. :labeln
  23. (DOS commands)
  24. goto done
  25.  
  26. :done          <--- cleanup label
  27. CD\menu        <--- return to IconDOS directory in case it was changed above
  28. ICONDOS mymenu <--- return control back to IconDOS and 'mymenu'
  29.  
  30.  
  31. RUN.BAT is initially configured to operate as a demo which simply
  32. displays a message identifying the selected icon where (DOS commands)
  33. are shown above.
  34.  
  35. ALTERNATE SETUP
  36.  
  37. If you feel that the above is too complex for your taste, there is
  38. nothing to prevent you from setting you a single, individual batch file
  39. for each icon.  The name of the batch file would be entered as the
  40. icon's command string.  The last step in the batch file should be to
  41. return control to IconDOS.
  42.  
  43. This alternate approach is perfectly valid but it is more wasteful of
  44. disk space due to the way a hard drive works.  Every disk file is stored
  45. as a chain of clusters.  A cluster is simply a fixed minimum unit of
  46. storage set by the hard drive manufacturer.  Clusters are most often 4K
  47. in size; however, 2K clusters are also used.  Partial clusters are NEVER
  48. allocated; therefore, a batch file that is 400 bytes in size requires 1
  49. full cluster for storage which wastes 3696 bytes out of a 4K cluster.
  50. This may not seem like much but it adds up quickly.  Creating a menu
  51. with only ten icons using this approach would waste 36K of disk space.
  52.  
  53. Using a single batch file containing multiple named command sets, as
  54. described above, is the more efficient, preferred approach.
  55.